//利用第五章定义的coin类编写一个CountFilps程序，其main方法将硬币抛100次，然后输出每一面朝上的次数。
public class pp6_6
{
  public static void main(String []args)
  {
   Coin coco = new Coin();
   final int MAX = 100;
   //sets sum ; upnumber;
   int sum = 0,upnumber = 0;
   for(sum =0;sum<MAX;sum++)
   {
     coco.flip();
     System.out.println(coco);
      if(coco.isHeads())
        upnumber++;
    }	
        System.out.println("The number of Heads is "+ upnumber);
   
  }  
}
      
      

